package simtester.test.pages

import geb.Module
import geb.Page

class TestRunDetailsPage extends Page {
    static url = 'testRun/details'
    static at  = { $('title').text() == 'SimTester - Detailed Results' }
    
    static content = {
        detailsTable {
            $('table tbody tr').collect {
                module TestRunDetailsRow, it
            }
        }
    }
}

class TestRunDetailsRow extends Module {
    static content = {
        cell { i -> $('td', i) }
        
        timestamp { cell(0).text() }
        type      { cell(1).text() }
        entry     { cell(2).text() }
        response  { cell(3).text() }
    }
}